package com.study.Controller;

import ch.qos.logback.core.model.Model;
import com.study.mapper.ClassMapper;
import com.study.model.Student;
import com.study.model.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ClassController {
    @Autowired
    ClassMapper mapper;

    @RequestMapping("teacher")
    String teacher(/*Model model*/){
        List<Teacher> teachers=mapper.getAllTeacher();
        return teachers.toString();
    }
    @RequestMapping("student")
    String student(/*Model model*/){
        List<Student> students=mapper.getAllStu();
        return students.toString();
    }


}
